import { defineStore } from 'pinia'
import { ref } from 'vue'

//计数模块状态
export const useCountStore = defineStore(
  'big-num', //状态id
  () => {
    const num = ref(0)
    const addCount = (n) => {
      num.value += n
    }

    return {
      num,
      addCount,
    }
  },
  {
    persist: true,
  },
)
